]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
overviewControls: Really fix x align
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Oct 2014 08:58:42 +0000 (10:58 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 10 Oct 2014 09:16:35 +0000 (11:16 +0200)
Commit a4475465f1f2 fixed the wrong alignment for the fully visible
control, but regressed the partially slid-out one; take the slideX
factor into account to get the right offset for both cases.

js/ui/overviewControls.js

index 5dd2be4ae9c9bf61ef989fb54b959d616d510058..b5f60de059a2208761e0fcc0c6b06624890538ea 100644 (file)
@@ -64,7 +64,8 @@ const SlideLayout = new Lang.Class({
         // flags only determine what to do if the allocated box is bigger
         // than the actor's box.
         let realDirection = getRtlSlideDirection(this._direction, child);
-        let alignX = (realDirection == SlideDirection.RIGHT) ? (availWidth - natWidth) : 0;
+        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth)
+                                                            : (availWidth - natWidth * this._slideX);
 
         let actorBox = new Clutter.ActorBox();
         actorBox.x1 = box.x1 + alignX + this._translationX;